<?php


namespace app\common\models\storeFalseData;


class Category
{
    /**
     * 商品分类
     * @return array[]
     */
    public function Lists()
    {
        $datas = [
            ["id" => 22, "name" => "123"],
            ["id" => 15, "name" => "茶", "lists" => [["id" => 118, "name" => "奶茶"], ["id" => 127, "name" => "柠檬茶"]]],
            ["id" => 10, "name" => "蔬菜"],
            ["id" => 13, "name" => "水果", "lists" => [["id" => 14, "name" => "草莓"], ["id" => 127, "name" => "香蕉"], ["id" => 117, "name" => "苹果"]]],
            ["id" => 7, "name" => "饮料", "lists" => [["id" => 18, "name" => "奶茶"], ["id" => 17, "name" => "柠檬茶"]]],
        ];

        return $datas;
    }

    /**
     * 添加/编辑分类
     * @return string
     */
    public function categoryModify()
    {
        $msg = '操作成功';
        return $msg;
    }

    /**
     * 删除分类
     * @return string
     */
    public function categoryDelete()
    {
        $msg = '删除分类成功';
        return $msg;
    }

    /**
     * 分类信息
     * @return array[]
     */
    public function categoryDetails()
    {
        //商户id:123456
        //分类id:123456
        //分类名称:
        //分类图片 url:"https://"
        //分类开关:1
        $datas['info'] = [
            'store_id' => '345',
            'id ' => '0',
            'name' => '充值卡',
            'thumb' => defaultGraph(),
            'is_open' => '1',
        ];
        return $datas;
    }
}
